﻿//*************************************************************************
//面向服务的协作式智能交通系统仿真软件SoC-ITSS v2.1 alpha
//发布单位：西北工业大学--巴黎高科MINES机器人与群智能系统联合实验室
//团队负责人：张凯龙 Zhang Kailong
//团队成员：张大方、杨安胜、王敏、谢策、王雨佳、谢尘玉等
//联系我们：kl.zhang@nwpu.edu.cn
//2012-2021
//*************************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

//*******************************************************
//
//文件名(File Name):           CyberCarSimulation.cs
//
//数据表(Tables):              nothing 
//
//          修改理由：         增加相应get set方法
//
//*******************************************************
namespace CyberCarSimulation.Bean
{
    /// <summary>
    /// 配置参数传递类
    /// </summary>
    public class SimulationConfig
    {
        private float txtVehicleDensity;          //车流密度
        private float txtReservationLineLength;   //车道预约线的长度
        private int txtTestTime;                  //实验次数

        private float txtPercentageBig;           //大车比例
        private float txtMaximumSpeed;            //最大行驶速度
        private float txtMaximumAcceleration;     //最大加速度

        private float txtMaximumDeceleration;     //最大减速度
        private float txtCruisingSpeed;           //巡航速度
        private float txtCrossingSpeed;            //通过速度

        private int txtVehicleQuantity;           //车辆数量
        private float txtHighPriorPercentage;     //高优先级车辆的比例
        private float txtMidPriorPercentage;      //低优先级车辆的比例

        private float txtServiceRatio;            //服务系数
        private float txtJamRatio;                //拥塞系数
        private float txtTimeRatio;               //时间系数




        /// <summary>
        /// 无参构造函数
        /// </summary>
        public SimulationConfig()
        {
        }


        /// <summary>
        /// 有参构造函数
        /// </summary>
        /// <param name="txtVehicleDensity">车流密度</param>
        /// <param name="txtReservationLineLength">预约长度</param>
        /// <param name="txtTestTime">试验次数</param>
        /// <param name="txtPercentageBig">车型比例</param>
        /// <param name="txtMaximumSpeed">最大速度</param>
        /// <param name="txtMaximumAcceleration">最大加速度</param>
        /// <param name="txtMaximumDeceleration">最大减速度</param>
        /// <param name="txtCruisingSpeed">巡航速度</param>
        /// <param name="txtThroughSpeed">通过速度</param>
        /// <param name="txtVehicleQuantity">车辆数量</param>
        /// <param name="txtHighPriorPercentage">高优先级车辆比</param>
        /// <param name="txtMidPriorPercentage">中优先级车辆比</param>
        public SimulationConfig(float txtVehicleDensity, float txtReservationLineLength,
            int txtTestTime, float txtPercentageBig, float txtMaximumSpeed,float txtMaximumAcceleration,
            float txtMaximumDeceleration, float txtCruisingSpeed, float txtCrossingSpeed,
            int txtVehicleQuantity, float txtHighPriorPercentage, float txtMidPriorPercentage,
            float txtServiceRatio, float txtJamRatio, float txtTimeRatio)
        {
            this.txtVehicleDensity = txtVehicleDensity;
            this.txtReservationLineLength = txtReservationLineLength;
            this.txtTestTime=txtTestTime;

            this.txtPercentageBig =txtPercentageBig;
            this.txtMaximumSpeed = txtMaximumSpeed;
            this.txtMaximumAcceleration= txtMaximumAcceleration;
            
            this.txtMaximumDeceleration= txtMaximumDeceleration;
            this.txtCruisingSpeed  = txtCruisingSpeed;
            this.txtCrossingSpeed = txtCrossingSpeed;

            this.txtVehicleQuantity = txtVehicleQuantity;
            this.txtHighPriorPercentage = txtHighPriorPercentage;
            this.txtMidPriorPercentage = txtMidPriorPercentage;

            this.txtServiceRatio = txtServiceRatio;
            this.txtJamRatio = txtJamRatio;
            this.txtTimeRatio = txtTimeRatio;
        }

        public float GetTxtVehicleDensity()
        {
            return this.txtVehicleDensity;
        }

        public void SetTxtVehicleDensity(float txtVehicleDensity)
        {
            this.txtVehicleDensity = txtVehicleDensity;
        }

        public float GetTxtReservationLineLength()
        {
            return this.txtReservationLineLength;
        }

        public void SetTxtReservationLineLength(float txtReservationLineLength)
        {
            this.txtReservationLineLength = txtReservationLineLength;
        }

        public int GetTxtTestTime()
        {
            return this.txtTestTime;
        }

        public void SetTxtTestTime(int txtTestTime)
        {
            this.txtTestTime = txtTestTime;
        }

        public float GetTxtPercentageBig()
        {
            return this.txtPercentageBig;
        }

        public void SetTxtPercentageBig(float txtPercentageBig)
        {
            this.txtPercentageBig = txtPercentageBig;
        }

        public float GetTxtMaximumSpeed()
        {
            return this.txtMaximumSpeed;
        }

        public void SetTxtMaximumSpeed(float txtMaximumSpeed)
        {
            this.txtMaximumSpeed = txtMaximumSpeed;
        }

        public float GetTxtMaximumAcceleration()
        {
            return this.txtMaximumAcceleration;
        }

        public void SetTxtMaximumAcceleration(float txtMaximumAcceleration)
        {
            this.txtMaximumAcceleration = txtMaximumAcceleration;
        }

        public float GetTxtMaximumDeceleration()
        {
            return this.txtMaximumDeceleration;
        }

        public void SetTxtMaximumDeceleration(float txtMaximumDeceleration)
        {
            this.txtMaximumDeceleration = txtMaximumDeceleration;
        }

        public float GetTxtCruisingSpeed()
        {
            return this.txtCruisingSpeed;
        }

        public void SetTxtCruisingSpeed(float txtCruisingSpeed)
        {
            this.txtCruisingSpeed = txtCruisingSpeed;
        }

        public float GetTxtCrossingSpeed()
        {
            return this.txtCrossingSpeed;
        }

        public void SetTxtCrossingSpeed(float txtCrossingSpeed)
        {
            this.txtCrossingSpeed = txtCrossingSpeed;
        }

        public int GetTxtVehicleQuantity()
        {
            return this.txtVehicleQuantity;
        }

        public void SetTxtVehicleQuantity(int txtVehicleQuantity)
        {
            this.txtVehicleQuantity = txtVehicleQuantity;
        }

        public float GetTxtHighPriorPercentage()
        {
            return this.txtHighPriorPercentage;
        }

        public void SetTxtHighPriorPercentage(float txtHighPriorPercentage)
        {
            this.txtHighPriorPercentage = txtHighPriorPercentage;
        }

        public float GetTxtMidPriorPercentage()
        {
            return this.txtMidPriorPercentage;
        }

        public void SetTxtMidPriorPercentage(float txtMidPriorPercentage)
        {
            this.txtMidPriorPercentage = txtMidPriorPercentage;
        }

        public float GetTxtServiceRatio()
        {
            return this.txtServiceRatio;
        }

        public void SetTxtServiceRatio(float txtServiceRatio)
        {
            this.txtServiceRatio = txtServiceRatio;
        }

        public float GetTxtJamRatio()
        {
            return this.txtJamRatio;
        }
        public void SetTxtJamRatio(float txtJamRatio)
        {
            this.txtJamRatio = txtJamRatio;
        }

        public float GetTxtTimeRatio()
        {
            return this.txtTimeRatio;
        }
        public void GetTxtTimeRatio(float txtTimeRatio)
        {
            this.txtTimeRatio = txtTimeRatio;
        }
        

        /// <summary>
        /// 将实体信息ToString
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            string Config = "VehicleDensity=" + this.txtVehicleDensity + "\r\n" +
                            "ReservationLineLength=" + this.txtReservationLineLength + "\r\n" +
                            "TestTime=" + this.txtTestTime + "\r\n" +

                            "PercentageBig=" + this.txtPercentageBig + "\r\n" +
                            "MaximumSpeed=" + this.txtMaximumSpeed + "\r\n" +
                            "MaximumAcceleration=" + this.txtMaximumAcceleration + "\r\n" +

                            "MaximumDeceleration=" + this.txtMaximumDeceleration + "\r\n" +
                            "CruisingSpeed=" + this.txtCruisingSpeed + "\r\n" +
                            "ThroughSpeed=" + this.txtCrossingSpeed + "\r\n" +

                            "VehicleQuantity=" + this.txtVehicleQuantity + "\r\n" +
                            "HighPriorPercentage=" + this.txtHighPriorPercentage + "\r\n" +
                            "MidPriorPercentage=" + this.txtMidPriorPercentage + "\r\n";

            return Config;
        }
    }
}